using System.Threading;

namespace SlSyncLibrary
{
    public class PromptResult
    {
        string inputBox;
        PromptButton button;
        AutoResetEvent promptCallBackSync=new AutoResetEvent(false);

        public string InputBoxValue { get { return inputBox; } }
        public PromptButton ButtonPressed { get { return button; } }

        internal PromptResult()
        {
        }

        public void ReturnResult(PromptButton result, string inputBox)
        {
            this.inputBox=inputBox;
            this.button=result;
            promptCallBackSync.Set();
        }

        internal void WaitResult()
        {
            promptCallBackSync.WaitOne();
        }
    }
}